<?xml version="1.0" encoding="ISO-8859-1" ?>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>    
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>


<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Toodete haldus</title>
</head>
<body>
<jsp:include page="index.jsp" ></jsp:include>
<h3>Toodete haldus</h3>
<h2><a href="item/search">Otsing </a><a href="add">lisamine </a><a href="change">andmete muutmine</a></h2>


<table>
<c:forEach items="${ItemTypes}" var="it">
	<tr>
	<td><a href="/ladu_R91/item/sub?subType=${it.itemTypeID}">${it.itemType}</a></td>
	<c:if test="${it.itemSubTypeList!=null}">
		<tr>
		<c:forEach items="${it.itemSubTypeList}" var="sub">
			</tr>
			<td><a href="/ladu_R91/item/sub?subType=${sub.itemTypeID}">${sub.itemType}</a></td>
			</tr>
			<c:if test="${sub.itemSubTypeList!=null}">
				<tr>
				<c:forEach items="${sub.itemSubTypeList}" var="subsub">
					<td><a href="/ladu_R91/item/sub?subType=${subsub.itemTypeID}">${subsub.itemType}</a></td>
					</tr>

				</c:forEach>
				</tr>
			</c:if>
		</c:forEach>
		</tr>
	</c:if>
	</tr>
</c:forEach>
</table>

<tabel>
<c:if test="${itemList!=null}">
<h2>Tooted:</h2>
<c:forEach items="${itemList}" var="il"> 
<tr>
<td>
<a href="selected?item=${il.itemID}">${il.name}</a>
</td>
</tr>
</c:forEach>
</c:if>


</tabel>


</body>
</html>